package com.example.consumer.listener;

import com.example.rocket.annotation.NbMQMessageListener;
import com.example.rocket.consumer.NbMqListener;
import com.example.rocket.core.NbMsg;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Slf4j
@Component
@NbMQMessageListener(topic = "first-topic-nb",consumerGroup = "nb-consumer")
public class NbMsgListener implements NbMqListener<NbMsg> {

    @Override
    public void onMessage(NbMsg message) {
        log.info("成功接受到消息===>{}",new String(message.getBody()));
    }
}
